<?php
/*
CREATE TABLE IF NOT EXISTS  `ci_sessions` (
session_id varchar(40) DEFAULT '0' NOT NULL,
ip_address varchar(16) DEFAULT '0' NOT NULL,
user_agent varchar(50) NOT NULL,
last_activity int(10) unsigned DEFAULT 0 NOT NULL,
user_data text NOT NULL,
PRIMARY KEY (session_id)
);
*/
class Session extends Doctrine_Record {
		
	public function setTableDefinition() {
    $this->hasColumn('session_id', 'string', 40,
    	array(
				'notnull' => true,
    		'default' => 0,
    		'primary' => true,
      )
    );
    
    $this->hasColumn('ip_address', 'string', 16,
    	array(
				'notnull' => true,
    		'default' => 0
      )
    );
    
    $this->hasColumn('user_agent', 'string', 50,
    	array(
				'notnull' => true
      )
    );
    
    
    $this->hasColumn('last_activity', 'integer', 4,
    	array(
				'notnull' => true,
    		'default' => 0,
    		'unsigned' => true
      )
    );
    
    $this->hasColumn('user_data', 'string', 3000,
    	array(
				'notnull' => true
      )
    );
	}
	
	public function setUp() {
		$this->setTableName('sessions');
	}
	
}